<?php
/*
 * @灯商云端
 * @功能说明：投诉建议模块
 * @更新说明：暂无更新
 * @文件名 SysestController.class.php
 * @编码 UTF-8
 * @创建时间 2015-7-21 下午3:38:10
 * @创建人 XING
 */

namespace home\Controller;
use dg\Model\SysMsgModel;
use Think\Controller;

class SysestController extends ApibaseController {
	/*
	 * 投诉建议模块
	 * @date: 2015-3-31下午7:33:00
	 * @editor: XING
	 */
	public function index(){
		/*参数初始化*/
		$page = I('get.page') ?: 1;
		$perpage = 10;$url = '';
		$list = M('SysSuggest');
		$url = array();
		if(I('get.user_mobile')){
			$list = $list->where('user_mobile LIKE "%'.I('get.user_mobile').'%"');
			$url['user_mobile'] = I('get.user_mobile');
		}
		if(I('get.user_id')){
			$list = $list->where(array('user_id'=>I('get.user_id')));
			$url['user_id'] = I('get.user_id');
		}
		$sysData = $list->order('sort','desc')->page($page,$perpage)->select();
		
		$this->assign('page',setPage($list->count(),$perpage,$page,'?'.http_build_query($url)));
		$this->assign('sysData',$sysData);
		$this->display('suggest/list');
	}
}